Database Migration Guide: How to migrate from Oracle to CockroachDB

Database Migration Guide: How to migrate from Oracle to CockroachDB

Why do Companies Migrate from Oracle to CockroachDB?

There is not one specific answer to this question, but rather a list of consistent trends that we have seen over the years. 

  • Companies migrate from Oracle to CockroachDB because of the high Total Cost of Ownership at Oracle - in which we include the operational overhead required to run an Oracle database. 
  • Companies migrate because they want to move to the cloud and, in particular, want to build on a distributed database that is compatible with Kubernetes.
  • Companies want the flexibility to deploy on-prem and in different cloud platforms which strengthens their resiliency (think AWS outages) and strengthens their ability to serve a global audience. 
  • Companies never want to shard again

What’s not mentioned in that list, and what bears mentioning, is the digital acceleration caused by the pandemic. Companies have stressed and exceeded the boundaries of legacy tech stacks. They have had no choice but to look for modern solutions to their new tech requirements and, in the process, they’re looking for the solutions that are built for the future. 

Oracle Migration Guide

Regardless of your reasons for the migration (and the lush green grass on the other side) every database migration conversation should begin with an acknowledgment of the challenge that migration represents. 

No ‘migration guide’ is a magic carpet to carry your data and applications from a traditional database to a cloud-native database. That being said, the challenge of migration is less daunting with a comprehensive guide to steer you.

If you’re using Oracle and you’re reading this blog, chances are you’ve experienced the limitations of legacy database technology and are planning to use a cloud-native database that will take advantage of the reduced complexity and ease of scale in the cloud.

At Cockroach Labs we have years of experience helping customers migrate workloads from Oracle over to CockroachDB. We’ve used that experience to polish this guide that’s intended to help you scope out and execute a migration from Oracle to CockroachDB. We hope that you find it to be a helpful tool. If you read the guide and find that you need additional support please don’t hesitate to contact us via https://support.cockroachlabs.com.

How to Migrate from Oracle to CockroachDB

  1.   Extract Schema(s)
  • Tables, views, sequences, indexes, constraints
  • Users, privileges, groups and roles
  • Refactor the Schema to Cockroach dialect
  1. Evaluated database embedded code
  • Stored Procedures, Jobs, and Triggers aren’t supported by CRDB
  • CRDB doesn’t support PLSQL
  • Must rewrite application to support outside of the database 
  1.   Extract Data using bulk or conventional methods
  2.   Load Schema and Data either through bulk or replication methods
  3.   Refactor Application SQL

The reduction of an Oracle migration into five steps is a comic oversimplification. We know that the process is challenging. And we’re here to help. We have engineers that have worked with both companies and understand all the nuances involved in a migration. 

If you’re ready to get started just download the Oracle to CockroachDB migration guide today. If you’re still in the process of measuring the value of a migration then check out this comparison of High Availability architecture in Oracle and CockroachDB.

About the author

Dan Kelly

Dan has been producing technical blogs, videos, whitepapers, and webinars at Cockroach Labs for the last 4+ years. His mission is to identify the most pressing problems developers face and to create content to solve them. Outside of work Dan is usually chasing his three year old daughter or cooking something indulgent.

linkedin link

Keep Reading

4 challenges when migrating to a cloud-native RDBMS

As organizations migrate to the cloud, they need a cloud-native, relational database to help them move all …

Read more
How to do a one-step MySQL import in CockroachDB

Update 3/4/19: This feature is out of beta! Want to learn more? Check out our webinar on migrating MySQL data to …

Read more
How to improve IoT application performance with multi-row DML

Internet of Things (IoT) and microservices-style applications need a database that can handle requirements …

Read more